package com.jt.demo9.controller;

import com.jt.demo9.pojo.User;
import com.jt.demo9.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {

    @Autowired
    private UserService userService;

    public void addUser(){
        User user = new User();
        user.setSex("女");
        user.setName("花木兰");
        user.setAge(18);
        user.setId(999);
        userService.addUser(user);
    }
}
